LinuxQMISDK-Lite  SLQS04.00.27
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
QmuxTransport.h File Reference

Go to the source code of this file.

Data Structures

struct  QcqmiService
 
struct  QmuxTransport
 

Macros

#define QCQMI_NODE_NAME_PREFIX   "qcqmi"
 
#define MAX_QMI_CLIENT   255
 
#define MAX_QMI_CLIENT_ID   255
 
#define INVALID_CLIENT_ID   255
 
#define INVALID_TRANSACTION_ID   0
 

Typedefs

typedef struct QmuxTransport QmuxTransport
 

Functions

int QmuxTransport_Initialize (QmuxTransport *pThis, char *devicePath, bool useMbim, void *pInterfaceSpecific)
 
void QmuxTransport_ShutDown (QmuxTransport *pThis)
 
void QmuxTransport_AttachQmiService (QmuxTransport *pThis, struct QmiService *pQmiService)
 
void QmuxTransport_DetachQmiService (QmuxTransport *pThis, struct QmiService *pQmiService)
 
int QmuxTransport_SendQmiPacket (QmuxTransport *pThis, uint8_t qmiServiceType, uint8_t qmiClientId, uint16_t qmiTransactionId, uint8_t *qmiPacket, uint16_t qmiPacketSize)
 

Macro Definition Documentation

#define INVALID_CLIENT_ID   255
#define INVALID_TRANSACTION_ID   0
#define MAX_QMI_CLIENT   255
#define MAX_QMI_CLIENT_ID   255
#define QCQMI_NODE_NAME_PREFIX   "qcqmi"

Typedef Documentation

typedef struct QmuxTransport QmuxTransport

This structure abstracts a QMUX transport layer. It is responsible for applying QMUX headers to QMI packets from QMI services and forwarding them to the device. It is responsible for receiving QMUX packets from the device. On the basis of QMUX headers, it distributes the SDUs (QMI packets) to the appropriate QMI service. It maintains a list of connected QMI service objects.

Parameters
useMbim
  • Using MBIM interface as opposed to direct QMUX interface for data layer.
pDataLayer
  • Pointer to instantiated data layer.
deviceFd
  • File descriptor of device.
shutdownFd
  • Event descriptor. Used to signal read thread to terminate.
qmiServiceList
  • List of connected QMI service objects.
writeLock
  • Provides mutual exclusion for write operations.
qmiServiceListLock
  • Provides thread safety for the service list.
readThread
  • Thread responsible for reading from device.
qcqmi
  • QCQMI data.

Function Documentation

void QmuxTransport_AttachQmiService ( QmuxTransport pThis,
struct QmiService pQmiService 
)

Attaches a QMI service to the transport layer.

Parameters
[in]pThisThe primary object of this call.
[in]pQmiServiceThe QMI service to be attached.
void QmuxTransport_DetachQmiService ( QmuxTransport pThis,
struct QmiService pQmiService 
)

Detaches a QMI service from the transport layer.

Parameters
[in]pThisThe primary object of this call.
[in]pQmiServiceThe QMI service to be detached.
int QmuxTransport_Initialize ( QmuxTransport pThis,
char *  devicePath,
bool  useMbim,
void *  pInterfaceSpecific 
)

Initialize the transport layer.

Parameters
[in]pThisThe primary object of this call.
[in]devicePathAbsolute path to device.
[in]useMbimUse MBIM interface as opposed to direct interface for data layer.
[in]pInterfaceSpecificA pointer to an object (may be NULL) related to the specific interface used. Currently ignored for useMbim = false. If useMbim = true, it may point to an already initialized MbimTransport object, in which case, this object will use that object rather than try to create its own MbimTransport object.
Returns
0 on success, < 0 on failure.
int QmuxTransport_SendQmiPacket ( QmuxTransport pThis,
uint8_t  qmiServiceType,
uint8_t  qmiClientId,
uint16_t  qmiTransactionId,
uint8_t *  qmiPacket,
uint16_t  qmiPacketSize 
)

Send a QMI request to the device and return immediately.

Parameters
[in]pThisThe primary object of this call.
[in]qmiServiceTypeQMI service type.
[in]qmiClientIdQMI client ID.
[in]qmiTransactionIdQMI transaction ID. Can be used for tracking purposes.
[in]qmiPacketPointer to QMI request.
[in]qmiPacketSizeSize in bytes of QMI packet.
Returns
0 on success, < 0 on failure.
void QmuxTransport_ShutDown ( QmuxTransport pThis)

Shut down the transport layer.

Parameters
[in]pThisThe primary object of this call.

Copyright (c) 2011-2015 Sierra Wireless, Inc. All rights reserved